<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<head lang="en">
    <meta charset="UTF-8" />
    <style>
    #main1{
    margin: auto;
    border-radius: 5px;
    }
    </style>
    <!-- 引入 ECharts 文件 -->
    <script th:src="@{/js/echarts.min.js}"></script>
    <script th:src="@{/js/echarts.js}"></script>
</head>
<body>
<!-- 为 ECharts 准备一个具备大小（宽高）的 DOM -->  
    <div id="main1" style="width: 900px;height:400px;"></div>
<script type="text/javascript" th:src="@{/js/jquery-1.8.3.min.js}"></script>
    <script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var myChart1 = echarts.init(document.getElementById('main1'));
    option1 = {
        title:{
            text: '放款成功的笔数',
            left:'center'
        },
        backgroundColor: '#fefefe',
        xAxis: {
            type: 'category',
            data: ['5-01', '5-02', '5-03', '5-04', '5-05', '5-06', '5-07', '5-08', '5-09', '5-10', '5-11', '5-12', '5-13']
        },
        tooltip : {
            trigger: 'axis',
            axisPointer : {            // 坐标轴指示器，坐标轴触发有效
                type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
            }
        },
        legend: {
            show: true,
            bottom: 'top',
            data: ['线下放款', '委托放款']
        },
        yAxis: {
            type: 'value'
        },
        series: [{
            name :'线下放款',
            data: [120, 200, 150, 80, 70, 110, 130,152,159,120,89,84,265],
            type: 'bar'
        },
            {
                name:'委托放款',
                data: [220, 280, 250, 180, 170, 210, 250,165,285,198,201,230,132],
                type: 'bar'
            }]
    };
    myChart1.setOption(option1);
    </script>
</body>
</html>